home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / src / mactech / volume14_1998 / 14.12.sit / 14.12 / Poor Man's Bryce 3.0 / PMBShell.h < prev    next >
C/C++ Source or Header  |  1998-08-09  |  2KB  |  60 lines

  1. #pragma once
  2. // PMBShell.h
  3. // ©1998 by Kas Thomas. 
  4. // Portions ©1998 by MacTech Magazine and Xplain Corp.
  5.  
  6. #include "QD3D.h"
  7. #include "QD3DGeometry.h"
  8.  
  9. // macros
  10. #define HiWrd( aLong )  (((aLong) >> 16) & 0xFFFF)
  11. #define LoWrd( aLong)   (aLong & 0xFFFF)
  12.  
  13. // defines
  14. #define APPLE_MENU 100
  15. #define FILE_MENU 101
  16. #define EDIT_MENU 102
  17. #define RENDER_MENU 103
  18. #define PREFS_MENU 104
  19. #define OUR_ALERT_RSRC_NO 401
  20.  
  21. #define QUIT_ITEM 6
  22. #define TEXTURE_ITEM 4
  23. #define CLOSE_ITEM 3
  24. #define OPEN_ITEM 2
  25. #define SPEED_CHECK_ITEM 5
  26. #define SWAP_GEOMETRY_ITEM 5
  27.  
  28. // typedefs
  29. struct _documentRecord {
  30.     TQ3ViewObject        fView ;                    // the view for the scene
  31.     TQ3GroupObject        fModel ;                // object in the scene being modelled
  32.     TQ3StyleObject        fInterpolation ;        // interpolation style used when rendering
  33.     TQ3StyleObject        fBackFacing ;            // whether to draw shapes that face away from the camera
  34.     TQ3StyleObject        fFillStyle ;            // whether drawn as solid filled object or not
  35.     float                fScale;                    // for AdjustCamera()
  36.     TQ3GroupPosition    fRotation;                // the transform for the model
  37.     TQ3GroupPosition    fObjectScale;            // for user-scaling of object
  38.     long                fMaxVertices;            // for user Prefs (grid resolution)
  39.     Boolean                fModelHasUVs;            // Does the model have UVs?
  40.     TQ3GeometryObject   fAlternateGeometry;     // do we have more than one representation?
  41.     
  42. };
  43. typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
  44.  
  45.  
  46. // prototypes
  47. static void         InitToolbox( void ) ;
  48. static void         MainEventLoop( void ) ;
  49. static void         HandleOSEvent(EventRecord *event) ;
  50. void                 InitDocumentData( DocumentPtr theDocument,FSSpec *fss ) ;
  51. TQ3Status             DocumentDraw( DocumentPtr theDocument ) ;
  52. void                 DisposeDocumentData( DocumentPtr theDocument) ;
  53. void                 SetupMenus( void );
  54. void                 DoMenu( long choice );
  55. void                 DoPolyhedralConversion( DocumentPtr theDocument );
  56. void                 ConvertTriangles( TQ3TriGridData *tgData, 
  57.                        TQ3PolyhedronTriangleData **t,
  58.                        unsigned long *numTriangles);
  59. void                 SwapGeometries( DocumentPtr theDocument ) ;
  60. void                 Explain( Str63 msg, long num );